//
//  NSArray+Edit.m
//  ClassManager
//
//  Created by ihope99 on 2017/8/13.
//  Copyright © 2017年 GZX. All rights reserved.
//

#import "NSArray+ZXExpand.h"

@implementation NSArray (ZXExpand)


-(id)GetSumData{
    return  [self valueForKeyPath:@"@sum.self"];
}
-(id)GetAvgData{
    return  [self valueForKeyPath:@"@avg.self"];
}
-(id)GetMaxData{
    return  [self valueForKeyPath:@"@max.self"];
}
-(id)GetMinData{
    return  [self valueForKeyPath:@"@min.self"];
}
-(id)GetDeleteRepeatData{
    return [self valueForKeyPath:@"@distinctUnionOfObjects.self"];
}
-(id)GetDictKeyToArray:(NSString *)key{
    return [self valueForKeyPath:key];
}
-(id)GetDictKeyToArrayAndDeleteRepect:(NSString *)key{
    return [self valueForKeyPath:[NSString stringWithFormat:@"@distinctUnionOfObjects.%@",key]];
}

@end
